package com.zwy.fornote.service;

import com.github.pagehelper.PageInfo;
import com.zwy.fornote.entity.req.ArticleReq;
import com.zwy.fornote.entity.req.NewArticleReq;
import com.zwy.fornote.entity.req.UserArticleReq;
import com.zwy.fornote.entity.vo.ArticleManageVO;
import com.zwy.fornote.model.Article;

/**
 *文章业务类接口
 *
 * @author zhuyi 1205242
 * @version ArticleService 2021/3/8 20:32
 */
public interface ArticleService {

    //获取所有文章--分页
    PageInfo<Article> selectArticle(ArticleReq req);

    //获取当前用户的文章
    PageInfo<Article> getArticlesByUser(UserArticleReq req);

    //获取当前用户收餐的文章
    PageInfo<Article> getArticlesByUserCollect(UserArticleReq req);

    //增加文章浏览量
    int AddArticleBrowseNum(int articleId);

    //新增文章
    int createNewArticle(NewArticleReq req);

    //收藏文章
    int collectArticle(int artId,int userId);

    PageInfo<ArticleManageVO> getManageArticleList(ArticleReq req);
}
